//
//  SYResourcesHeaderView.m
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/4/23.
//  Copyright © 2019年 SanYi. All rights reserved.
//

#import "SYResourcesHeaderView.h"


@interface SYResourcesHeaderView ()
@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *numberLab;
@property (weak, nonatomic) IBOutlet UILabel *sizeLab;
@property (weak, nonatomic) IBOutlet UILabel *timeLab;
@property (weak, nonatomic) IBOutlet UILabel *xindeLab;

@end


@implementation SYResourcesHeaderView

- (void)setZyModel:(SYZiYuanShenQingModel *)zyModel {
    self.backgroundColor = [UIColor yellowColor];
}
- (void)resourcesHeaderViewIndexPath:(NSInteger)index ziyuanmodel:(SYZiYuanShenQingModel *)zyModel {
    _zyModel = zyModel;
    if (index %2) {
        self.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
        
    } else {
        self.backgroundColor = [UIColor whiteColor];
    }
    
    self.nameLab.text = zyModel.name;
    self.numberLab.text = zyModel.numberList;
    self.sizeLab.text = zyModel.sizeNumber;
    self.timeLab.text = zyModel.dateNumber;
    self.xindeLab.text = zyModel.xindeNumber;
    
    
}
- (IBAction)selectBtnClick:(UIButton *)sender {
    NSInteger tag = sender.tag;
    if (self.block) {
        self.block(self.zyModel, tag-40);
    }
    
    
}
@end













